<div class="drag_chart_comp">
    <p class="chart_title">磁盘使用率</p>
    <div id="chartD" class="chart_item"></div>
</div>
<script>
let idx = 1;
let option = {
    timeline: {
        data: [
            '2013-05-01',
            {name: '2013-06-01', symbol: 'emptyStar6', symbolSize: 8},
            '2013-07-01',
            {name: '2013-08-01', symbol: 'star6', symbolSize: 8}
        ],
        label: {
            formatter: function (s) {
                return s.slice(0, 7);
            },
            textStyle: {
                fontSize: 14,
                color: '#fff'
            },
        },
        y2: 30,
        lineStyle: {
            color: '#216c79',
            width: 2
        },
        controlStyle: {
            normal: {
                color: '#216c79',
            },
        },
        checkpointStyle: {
            color: '#216c79',
        }
    },
    options: [
        {
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b} : {c} ({d}%)"
            },
            legend: {
                y: 30,
                textStyle: {
                    fontSize: 14,
                    color: '#fff'
                },
                data: ['未使用', '已使用']
            },
            color: ['#9aca63', '#fe8463'],
            series: [
                {
                    type: 'pie',
                    center: ['50%', '45%'],
                    radius: '50%',
                    data: [
                        {value: idx * 128 + 80, name: '已使用'},
                        {value: idx * 64 + 160, name: '未使用'},
                    ]
                }
            ]
        },
        {
            series: [
                {
                    type: 'pie',
                    data: [
                        {value: idx * 128 + 80, name: '已使用'},
                        {value: idx * 64 + 160, name: '未使用'},
                    ]
                }
            ]
        },
        {
            series: [
                {
                    type: 'pie',
                    data: [
                        {value: idx * 128 + 80, name: '已使用'},
                        {value: idx * 64 + 160, name: '未使用'},
                    ]
                }
            ]
        },
        {
            series: [
                {
                    type: 'pie',
                    data: [
                        {value: idx * 128 + 80, name: '已使用'},
                        {value: idx * 64 + 160, name: '未使用'},
                    ]
                }
            ]
        },
        {
            series: [
                {
                    type: 'pie',
                    data: [
                        {value: idx * 128 + 80, name: '已使用'},
                        {value: idx * 64 + 160, name: '未使用'},
                    ]
                }
            ]
        },
    ]
};
let chartD = echarts.init(document.getElementById('chartD'), 'macarons')
chartD.setOption(option)
</script>
